public class Rules extends Thread
{
	public static int round = 0;
	public static int maxRound = 5;
	public static void getRules(int player1, int player2)
	{
		//NPC pc = new NPC();
		round += 1;
		int result = 0;
		int mp = player1 - player2;
		switch (mp)
		{
			case -1:
			case 2:
				System.out.println("**玩家1胜利**");
				int x1 = UserPlayer.getScore();
				UserPlayer.setScore(x1 + 1);
				MainWindow.textA.append("你"+" 赢了\n");
				//result = 1;
				break;
			case 0:
				System.out.println("**平局**");
				MainWindow.textA.append("**平局**\n");
				break;
			case 1:
			case -2:
				System.out.println("**玩家2胜利**");
				int x2 = NPC.getScore();
				NPC.setScore(x2 + 1);
				MainWindow.textA.append(NPC.getName()+" 赢了\n");
				//result = -1;
				break;
		}
		if(round == maxRound)
		{
			
			MainWindow.windowGameEnd();
		}
	}
	/*public void give(NPC npc1)
	{
		npc1.out();
	}*/
}
